
define(['app'],function (app) {
  app.config(['$stateProvider', '$urlRouterProvider','$ionicConfigProvider', function ($stateProvider, $urlRouterProvider,$ionicConfigProvider) {

    //解决tabs在android上置顶问题
    $ionicConfigProvider.platform.ios.tabs.style('standard');
    $ionicConfigProvider.platform.ios.tabs.position('bottom');
    $ionicConfigProvider.platform.android.tabs.style('standard');
    $ionicConfigProvider.platform.android.tabs.position('standard');

    $ionicConfigProvider.platform.ios.navBar.alignTitle('center');
    $ionicConfigProvider.platform.android.navBar.alignTitle('left');

    $ionicConfigProvider.platform.ios.backButton.previousTitleText('').icon('ion-ios-arrow-thin-left');
    $ionicConfigProvider.platform.android.backButton.previousTitleText('').icon('ion-android-arrow-back');

    $ionicConfigProvider.platform.ios.views.transition('ios');
    $ionicConfigProvider.platform.android.views.transition('android');

    $stateProvider

      .state('access',{
        url: '/access',
        abstract: true,
        template: '<ion-nav-view></ion-nav-view>'
      })
      .state('access.signin', {
        //成员登录
        url: '/signin',
        templateUrl: 'templates/account/views/signin.html',
        controller:'signinController',
        needLogin: false
      })
      .state('access.companySimpleInfor',{
        //选择公司
        url: '/companySimpleInfor',
        templateUrl: 'templates/account/views/companySimpleInfor.html',
        controller:'companySimpleInforController',
        needLogin: false
      })
      .state('access.signup', {
        //成员注册
        url: '/signup/:data',
        templateUrl: 'templates/account/views/signup.html',
        controller:'signupController',
        needLogin: false
      })
      .state('home', {
        //首页
        url: '/home',
        template: '<div class="fade-in-right-big smooth">首页</div>'
      })
    ;



    // if none of the above states are matched, use this as the fallback
    $urlRouterProvider.otherwise('/access/signin');

  }]);
});
